#ifndef RATIONALCURVEITEM_H
#define RATIONALCURVEITEM_H
#include "curveitem.h"
#include <vector>

class CurveScene;

namespace curveLib
{
    template<class IPoint, class Container>
    class IRational;
}

typedef curveLib::IRational< QPointF, QVector<QPointF> > IRatioF;

class RationalCurveItem : public CurveItem
{
public:
    RationalCurveItem(IRatioF * numCurve, CurveScene *scene);

    void AddPoint(const QPointF &pos, double weight);
    void AddPoint(const QPointF &pos);

    IRatioF * GetNumCurve();
    std::vector<double> * GetWeightsPtr();

    void   SetControlPoint(int i, const QPointF &pos, double weight);
    void   SetWeight(int i, double weight);
    double GetWeight(int i);

protected:
    QPainterPath shape() const;

private:
    IRatioF *m_numCurve;
};

#endif // RATIONALCURVEITEM_H
